package Sql;

import java.sql.DriverManager;

public class sql {
    public static void main(String[] args) {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            var c = DriverManager.getConnection("jdbc:mysql:/wang?user=root");
            var ss = c.prepareStatement("null");
            ss.execute("use wang");
            var sql = "INSERT INTO table_name (name, age, sex, 备注) VALUES ('丽丽', 15, '女', null);";
            System.out.println(sql);
            var s = ss.execute(sql);
            ss.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
